class testPlugin {
  constructor(options) {
    this.options = options;
  }
  apply(compiler) {
    compiler.hooks.run.tap("testPlugin", (compilation) => {
      console.log("我是run");
    });

    compiler.hooks.beforeCompile.tap("testPlugin", (params) => {
      console.log("我是beforeCompile");
    });

    compiler.hooks.compile.tap("testPlugin", (params) => {
      console.log("我是compile");
    });

    compiler.hooks.emit.tapAsync("testPlugin", (compilation, callback) => {
      console.log("我是emit");
      callback();
    });

    compiler.hooks.done.tap("testPlugin", (stats) => {
      console.log("我是done");
    });
  }
}
module.exports = testPlugin;
